﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GIGen
{
    class Program
    {
        /// <summary>
        /// usage:
        /// .exe filpath-to-souce-code /langauge
        /// current language supported:
        /// js                          -- javascript
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            ParseRequest request = new ParseRequest();

            if (args != null && args.Length >= 5)
            {
                request.FilePath = args[0];
                int i = 1;
                do
                {
                    switch (args[i])
                    {
                        case "/L": request.LanguageCode = args[i + 1];
                            break;
                        case "/O": request.OutputFilePath = args[i + 1];
                            break;
                        case "/M": request.MachineName = args[i + 1];
                            break;
                    }
                    i += 2;
                } while (i < args.Length);

                request.ProcessRequest();
                
            }
            else
            {
                Console.WriteLine("Usage: GIGen.exe source-file-path /L <language-code> /O <output-file-path> [/M machine-name]");
            }
        }


    }
}
